package ycj.learn.springcloud.consumeruserfeign.controller;

import ycj.learn.springcloud.core.entities.Res;
import ycj.learn.springcloud.core.service.UserClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/consumer/consumeruser")
public class UserController {

    @Autowired
    UserClientService service;

    @GetMapping("/{id}")
    public Res getOne(@PathVariable Long id) {

        return service.getOne(id);
    }
}
